﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace M
{
    public abstract class EntityBase { }

    public abstract class EntityBase<TKey> : EntityBase
        where TKey : struct
    {
        public TKey Id { get; set; }
    }

    public abstract class FullAuditEntityBase<TKey> : 
        EntityBase<TKey>, 
        ISoftDelete,
        ICreatedInfo, 
        IUpdatedInfo
        where TKey : struct
    {
        public bool IsDeleted { get; set; }
        public DateTime? CreatedTime { get; set; }
        public Guid? CreatorId { get; set; }
        public DateTime? UpdatedTime { get; set; }
        public Guid? UpdatorId { get; set; }
    }

    public interface ISoftDelete
    {
        public bool IsDeleted { get; set; }
    }

    public interface ITenant
    {
        public int? TenantId { get; set; }
    }

    public interface ICreatedInfo
    {
        public DateTime? CreatedTime { get; set; }
        public Guid? CreatorId { get; set; }
    }

    public interface IUpdatedInfo
    {
        public DateTime? UpdatedTime { get; set; }
        public Guid? UpdatorId { get; set; }
    }


}
